//实现
#include "global.h"
void draw_line(SDL_Point *point,SDL_Point *point2)
{
    SDL_RenderDrawLine(ren,point->x,point->y,point2->x,point2->y);
}
//刷新
void refresh()
{
    SDL_RenderPresent(ren);
}
//x y  颜色 大小
void draw_text(char *text,SDL_Point pos,SDL_Color color, int size)
{
 TTF_Font *font=  TTF_OpenFont("ttf/regular.ttf",size);
 if(font==NULL)
 {printf("no font");}
 SDL_Surface *face =TTF_RenderUTF8_Blended(font,text,color);
 SDL_Texture *tex = SDL_CreateTextureFromSurface(ren,face);
 SDL_Rect src= {0,0,face->w,face->h};
 //目标
 SDL_Rect dst={pos.x,pos.y,face->w,face->h};
 SDL_RenderCopy(ren,tex,&src,&dst);
}
SDL_Surface read_img(char *file)
{
    
    return ;
}